3b576ba4c47570e98254a7d42dd6d6a3dcbb7850,greenmail-core/src/main/java/com/icegreen/greenmail/imap/commands/FetchCommand.java,FetchCommand,handleBodyFetch,#MimeMessage#String#String#StringBuilder#,188
Before Change
}
byte[] bytes = GreenMailUtil.getBodyAsBytes(part);
bytes = doPartial(partial, bytes, response);
addLiteral(bytes, response);
}
}
}
After Change
}
}
if (null == part) {
throw new IllegalStateException("Got null for " + sectionSpecifier);
}
// A bit optimistic to only cover theses cases ... TODO
if ("message/rfc822".equalsIgnoreCase(part.getContentType())) {
handleBodyFetch((MimeMessage) part.getContent(), spec, partial, response);
} else if ("TEXT".equalsIgnoreCase(spec)) {
handleBodyFetchForText(mimeMessage, partial, response);
} else {
byte[] bytes = GreenMailUtil.getBodyAsBytes(part);
bytes = doPartial(partial, bytes, response);
addLiteral(bytes, response);
}
}
}